package com.java.user.service;

import com.java.param.CartListParam;
import com.java.param.PageParam;
import com.java.param.UserCheckParam;
import com.java.param.UserLoginParam;
import com.java.pojo.User;
import com.java.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service

public interface UserService {

    R check(UserCheckParam userCheckParam);

    R register(User user);

    /**
     * 登录业务
     * @param userLoginParam 用户名和密码，密码未加密
     * @return
     */
    R login(UserLoginParam userLoginParam);

    /**
     * 根据分页查询用户信息
     * @param pageParam
     * @return
     */
    R listPage(PageParam pageParam);

    /**
     * 根据userid 删除用户
     * @return
     */
    R userRemove(Integer userId);

    /**
     * 修改用户信息
     * @param user
     * @return
     */
    R update(User user);

    /**
     * 添加用户
     * @param user
     * @return
     */
    R save(User user);
}
